/*
 * @Description: 
 * @Author: chaixinyu
 * @Date: 2022-10-31 09:51:32
 * @LastEditors: chaixinyu
 * @LastEditTime: 2023-01-03 15:23:30
 */

// 创建数据库连接池的模块
const mysql = require('mysql')
const config = require('./config')

var pool = mysql.createPool({
    multipleStatements: true, // 允许每个query操作的时候执行多条sql语句
    connectionLimit: 10,
    host: config.host,
    user: config.user,
    password: config.password,
    database: config.database,
    // port: config.port
})

// module.exports = pool

// const mysql = require('mysql')

// const db = mysql.createPool({
//     host: '127.0.0.1',
//     user: 'root',
//     password: '1234',
//     database: 'team_design_db',
// })

// module.exports = db
module.exports = pool
